<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="the-player">
<head>
<title>PLAYER!</title>

<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-language" content="en" />
<meta name="author" content="Dominic Bestler" />
<meta name="keywords" content="FIXME" />
<meta name="description" content="FIXME" />
<link type="text/css" href="/css/cupertino/jquery-ui-1.8.13.custom.css" rel="stylesheet" />	
<script type="text/javascript" src="/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript">
$( init );

function init() {
	$("#load_rankings").triggerHandler('click'); 
}

</script>

</head>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:useBean id="playerSession" scope="session" class="com.player.jsp.SessionBean" /> 

<body>
	<jsp:include page="header.jsp"/>

    <br/><br/><br/>
    
    <div id="navbar" align="center" style="background: grey">
      <div align="center">
        <!-- FIXME highlight -->
        <!-- FIXME move styles to CSS -->
        <span id="load_rankings" style="cursor: pointer;">Rankings</span>&nbsp;&nbsp;
        <span id="load_challenge" style="cursor: pointer;">Challenge!</span>&nbsp;&nbsp;
        <span id="load_tables" style="cursor: pointer;">Tables</span>&nbsp;&nbsp;
        <span id="load_about" style="cursor: pointer;">About</span>
      </div>
    </div>
    
    <br/><br/><hr/><br/>
    <div id="content" align="center"></div>
    
    <script type="text/javascript">
    $.ajaxSetup ({  
    	cache: false  
	});
	
    // LOAD FUNCTIONS
	var ajax_load = "<img src='loading.gif' alt='loading...' />";

	function loadContentAjax(url) {
		$("#content").html(ajax_load).load(url);  
	}
	 
	var rankingsUrl = "/rankings.jsp";  
	$("#load_rankings").click(function(){  
	    $("#content").html(ajax_load).load(rankingsUrl);  
	});  
	
	var tablesUrl = "/tables.jsp";  
	$("#load_tables").click(function(){  
	    $("#content").html(ajax_load).load(tablesUrl);  
	});

	</script>
    
    <br/><hr/><br/><br/>
    
    <br/>

    <% if (playerSession.isDebug()) { %>
      <jsp:include page="sessioncontents.jsp"/>
    <% } %>
    
  </body>
</html>